package juc;

/**
 * 拷贝小括号，写死右箭头，落地大括号
 */
@FunctionalInterface
interface Foo{
    public int add(int x,int y);

    default int mul(int x, int y) {
        System.out.println("come in mul method");
        return x*y;
    }
}
public class LamdaExpressDemo {
    public static void main(String[] args) {
        Foo foo = (int x,int y) -> {
            System.out.println("come in add method");
            return x + y;
        };
        foo.add(4,5);
        foo.mul(2,9);
    }
}
